package test1;

import java.util.Scanner;

public class Shop {
    public static void main(String[] args) {
        System.out.println("欢迎来到宠物店");
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入要领养的宠物名字");
        String name=sc.next();
        System.out.println("请选择要领养的宠物类型：（1.狗狗 2.企鹅）");
        int type=sc.nextInt();

        if (type==1){
            Dog d=new Dog();
            d.strain="萨摩耶";
            d.name=name;
            d.print();
        }else{
            Penguins p=new Penguins();
            p.name=name;
            p.print();
        }
    }
}
